<!DOCTYPE html>
<html>
<head>
    <title>OnLine Example</title>
</head>
<body>
    <p>You are currently: <script>document.write(navigator.onLine ? "Online" : "Offline");</script></p>
    <p>To change your status, click File -&gt; Work Offline and reload this page.</p>
</body>
</html>
